package v3.main;

import v3.object.STcfg;
import galaxy.obj.Point;

public class CharAscii
{
	public static void main(String[] args)
	{
		int x = 46;
		int y = 11;
		Point p = new Point(x, y);
		STcfg sTcfg = new STcfg();
		sTcfg.setUp(null);

		StringBuilder status = new StringBuilder();
		status.append("   xxxxxxxxxx\n");
		status.append("y  8   1   2\n");
		status.append("y    \\ | /\n");
		status.append("y  7 - O - 3\n");
		status.append("y    / | \\\n");
		status.append("y  6   5   4\n");
		status.append("y\n\n");

		for (int yy = y - 1; yy < y + 2; yy++)
		{
			String line = "";
			for (int xx = x - 1; xx < x + 2; xx++)
			{
				line = line + "[" + xx + "," + yy + "]\t";
			}
			System.out.println(line);
		}

		System.out.println(STcfg.getNewPosition(p, 8, 1)+"\t"+STcfg.getNewPosition(p, 1, 1)+"\t"+STcfg.getNewPosition(p, 2, 1)+"\t");
		System.out.println(STcfg.getNewPosition(p, 7, 1)+"\t"+STcfg.getNewPosition(p, 0, 1)+"\t"+STcfg.getNewPosition(p, 3, 1)+"\t");
		System.out.println(STcfg.getNewPosition(p, 6, 1)+"\t"+STcfg.getNewPosition(p, 5, 1)+"\t"+STcfg.getNewPosition(p, 4, 1)+"\t");

		status.append("Position:\t" + p + "\n" + "\n");
		for (int i = 1; i < 9; i++)
		{
			Point np = STcfg.getNewPosition(p, i, 1);
			status.append("Cursor = :" + i + "\t" + np + "\n");
		}
		System.out.println(status.toString());
	}
}
